home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / misc / amag / am9305d.lha / EGS.lha / EGS / EGS_Devels / doc / egsgadbox.doc < prev    next >
Text File  |  1993-03-18  |  47KB  |  2,158 lines

  1. /*
  2. *  $
  3. *  $ FILE     : egsgadbox.doc
  4. *  $ VERSION  : 1
  5. *  $ REVISION : 1
  6. *  $ DATE     : 08-Feb-93 09:53
  7. *  $
  8. *  $ Author   : mvk
  9. *  $
  10. *
  11. *
  12. * (c) Copyright 1990/93 VIONA Development
  13. *     All Rights Reserved
  14. *
  15. */
  16. egsgadbox.library/EB_AddFirstSon
  17. egsgadbox.library/EB_AddLastSon
  18. egsgadbox.library/EB_AllocMemCon
  19. egsgadbox.library/EB_CalcGadgetGfx
  20. egsgadbox.library/EB_CalcMinMax
  21. egsgadbox.library/EB_CalcPositions
  22. egsgadbox.library/EB_CalcRealSize
  23. egsgadbox.library/EB_ConnectGadgets
  24. egsgadbox.library/EB_CreateActionGadget
  25. egsgadbox.library/EB_CreateArrow
  26. egsgadbox.library/EB_CreateArrowGfx
  27. egsgadbox.library/EB_CreateBackBorder
  28. egsgadbox.library/EB_CreateBoolGadget
  29. egsgadbox.library/EB_CreateBorder
  30. egsgadbox.library/EB_CreateBox
  31. egsgadbox.library/EB_CreateBoxedMultiText
  32. egsgadbox.library/EB_CreateButton24
  33. egsgadbox.library/EB_CreateButtonGadget
  34. egsgadbox.library/EB_CreateCenterText
  35. egsgadbox.library/EB_CreateCheckMarkGadget
  36. egsgadbox.library/EB_CreateDoubleBorder
  37. egsgadbox.library/EB_CreateFillBox
  38. egsgadbox.library/EB_CreateFrontBorder
  39. egsgadbox.library/EB_CreateGadContext
  40. egsgadbox.library/EB_CreateGroupBorder
  41. egsgadbox.library/EB_CreateHorizBox
  42. egsgadbox.library/EB_CreateHorizFill
  43. egsgadbox.library/EB_CreateHorizProp
  44. egsgadbox.library/EB_CreateHorizTable
  45. egsgadbox.library/EB_CreateInfoBox
  46. egsgadbox.library/EB_CreateIntegerGadget
  47. egsgadbox.library/EB_CreateLateBox
  48. egsgadbox.library/EB_CreateMaster
  49. egsgadbox.library/EB_CreateMasterWindow
  50. egsgadbox.library/EB_CreateMultiAction
  51. egsgadbox.library/EB_CreateMultiAction2
  52. egsgadbox.library/EB_CreateMultiActionV
  53. egsgadbox.library/EB_CreateMultiText
  54. egsgadbox.library/EB_CreateNameIntegerGadget
  55. egsgadbox.library/EB_CreateNameRealGadget
  56. egsgadbox.library/EB_CreateNameStringGadget
  57. egsgadbox.library/EB_CreateRealGadget
  58. egsgadbox.library/EB_CreateResponseBox
  59. egsgadbox.library/EB_CreateStringGadget
  60. egsgadbox.library/EB_CreateSuperHorizProp
  61. egsgadbox.library/EB_CreateSuperVertiProp
  62. egsgadbox.library/EB_CreateText
  63. egsgadbox.library/EB_CreateTextAction
  64. egsgadbox.library/EB_CreateTextBoolean
  65. egsgadbox.library/EB_CreateVertiBox
  66. egsgadbox.library/EB_CreateVertiFill
  67. egsgadbox.library/EB_CreateVertiProp
  68. egsgadbox.library/EB_CreateVertiTable
  69. egsgadbox.library/EB_CreateWindow
  70. egsgadbox.library/EB_CWidth
  71. egsgadbox.library/EB_DeleteGadContext
  72. egsgadbox.library/EB_FindGadget
  73. egsgadbox.library/EB_FreeMemCon
  74. egsgadbox.library/EB_GetStringData
  75. egsgadbox.library/EB_LinkStringGadgets
  76. egsgadbox.library/EB_LinkStringGadgetsID
  77. egsgadbox.library/EB_MAX
  78. egsgadbox.library/EB_MIN
  79. egsgadbox.library/EB_NewFixHeight
  80. egsgadbox.library/EB_NewFixWidth
  81. egsgadbox.library/EB_NewMaxHeight
  82. egsgadbox.library/EB_NewMaxWidth
  83. egsgadbox.library/EB_NewMinHeight
  84. egsgadbox.library/EB_NewMinWidth
  85. egsgadbox.library/EB_NewSameSize
  86. egsgadbox.library/EB_NewPri
  87. egsgadbox.library/EB_ProcessGadBoxes
  88. egsgadbox.library/EB_ProcessGadBoxesSize
  89. egsgadbox.library/EB_PutIntData
  90. egsgadbox.library/EB_PutRealData
  91. egsgadbox.library/EB_PutStringData
  92. egsgadbox.library/EB_SMatch
  93. egsgadbox.library/EB_SWidth
  94. egsgadbox.library/EB_WriteInfoBox
  95. egsgadbox.library/EB_WriteInfoBoxInt
  96.  
  97.  
  98. egsgadbox.library/EB_AddFirstSon
  99. NAME
  100.   EB_AddFirstSon  Add son to gadbox
  101.  
  102. SYNOPSIS
  103.   EB_AddFirstSon(father, son)
  104.          A0      A1
  105.   EB_GadBoxPtr  father, son;
  106.  
  107. FUNCTION
  108.   Add an gadbox as first son to an other gadbox.
  109.  
  110. INPUTS
  111.  
  112. RETURNS
  113.  
  114.  
  115.  
  116. egsgadbox.library/EB_AddLastSon
  117. NAME
  118.   EB_AddLastSon  Add son to gadbox
  119.  
  120. SYNOPSIS
  121.   EB_AddLastSon(father, son)
  122.         A0      A1
  123.  
  124.   EB_GadBoxPtr   father, son;
  125.  
  126. FUNCTION
  127.   Add an gadbox as last son to an other gadbox.
  128.  
  129. INPUTS
  130.  
  131. RETURNS
  132.  
  133.  
  134.  
  135. egsgadbox.library/EB_AllocMemCon
  136. NAME
  137.   EB_AllocMemCon   Allocate memory to context
  138.  
  139. SYNOPSIS
  140.   mem = EB_AllocMemCon(con, size)
  141.   D0                   A0   D0
  142.  
  143.   APTR           mem;
  144.   EB_ContextPtr  con;
  145.   LONG           size;
  146.  
  147. FUNCTION
  148.   Allocate memory which is tracked using a context. The memory must be freed
  149.   using EB_FreeMemCon or using EB_DeleteGadContext.
  150.  
  151. INPUTS
  152.   con     : pointer to context
  153.   size    : size in bytes
  154.  
  155. RETURNS
  156.   pointer to memory or NULL if failed
  157.  
  158.  
  159.  
  160. egsgadbox.library/EB_CalcGadgetGfx
  161. NAME
  162.   EB_CalcGadgetGfx  calculate gadgets graphics
  163.  
  164. SYNOPSIS
  165.   done = EB_CalcGadgetGfx(con, box)
  166.   D0                      A0   A1
  167.  
  168.   BOOL    done;
  169.   EB_GadContext  con;
  170.   EB_GadBoxPtr   box;
  171.  
  172. FUNCTION
  173.   Calculates and creates the rendering commands for the gadgets (see also
  174.   EB_ProcessGadBoxes). Normaly you need not call this function, as it is part
  175.   of EB_ProcessGadBoxes.
  176.  
  177. INPUTS
  178.   con   : pointer to gadget context
  179.   box   : pointer to root of gadbox tree
  180.  
  181. RETURNS
  182.   FALSE if fails, see con->error field for more information
  183.  
  184.  
  185.  
  186. egsgadbox.library/EB_CalcMinMax
  187. NAME
  188.   EB_CalcMinMax  calculates gadgets min and max
  189.  
  190. SYNOPSIS
  191.   done = EB_CalcMinMax(box)
  192.   D0                   A0
  193.  
  194.   BOOL    done;
  195.   EB_GadBoxPtr   box;
  196.  
  197. FUNCTION
  198.   Calculates the real minimum and maximum values of a gadbox tree, according
  199.   to their given min and max values. Normaly you need not call this function,
  200.   as it is part of EB_ProcessGadBoxes.
  201.  
  202. INPUTS
  203.   box  : pointer to root of gadbox tree
  204.  
  205. RETURNS
  206.   FALSE if fails, see con->error field for more informations
  207.  
  208.  
  209.  
  210. egsgadbox.library/EB_CalcPositions
  211. NAME
  212.   EB_CalcPositions  calculate gadgets position
  213.  
  214. SYNOPSIS
  215.   done = EB_CalcPositions(box, x, y)
  216.   D0                      A0   D0 D1
  217.  
  218.   BOOL           done;
  219.   EB_GadBoxPtr   box;
  220.   WORD           x, y;
  221.  
  222. FUNCTION
  223.   Calculates the real positions of gadgets and rendering of a gadbox tree,
  224.   according to their minimal sizes. Normaly you need not call this function,
  225.   as it is part of EB_ProcessGadBoxes.
  226.  
  227. INPUTS
  228.   box    : pointer to root of gadbox tree
  229.   x, y   : upper left relative coordinates
  230.  
  231. RETURNS
  232.   FALSE if fails, see con->error field for more informations
  233.  
  234.  
  235.  
  236. egsgadbox.library/EB_CalcRealSize
  237. NAME
  238.   EB_CalcRealSize   calculate gadgets sizes
  239.  
  240. SYNOPSIS
  241.   done = EB_CalcRealSize(box)
  242.   D0                     A0
  243.  
  244.   BOOL           done;
  245.   EB_GadBoxPtr   box;
  246.  
  247. FUNCTION
  248.   Calculates the real size of every member in a gadbox tree, according to
  249.   their minimal and maximal values. Normaly you need not call this function,
  250.   as it is part of EB_ProcessGadBoxes.
  251.  
  252. INPUTS
  253.   box    : pointer to root of gadbox tree
  254.  
  255. RETURNS
  256.   FALSE if fails, see con->error field for more informations
  257.  
  258.  
  259.  
  260. egsgadbox.library/EB_ConnectGadgets
  261. NAME
  262.   EB_ConnectGadgets   connect gadgets of gadbox tree
  263.  
  264. SYNOPSIS
  265.   EB_ConnectGadgets(box, first, num)
  266.             A0   A1     A2
  267.  
  268.   EB_GadBoxPtr   box;
  269.   EI_GadgetPtr   *first;
  270.   WORD           *num;
  271.  
  272. FUNCTION
  273.   Connects the gadgets of a gadbox tree to a gadget list (or tree if master
  274.   gadgets are used). Normaly you need not call this function, as it is part
  275.   of EB_ProcessGadBoxes.
  276.  
  277. INPUTS
  278.   box     : pointer to root of gadbox tree
  279.   first   : pointer to EI_GadgetPtr, in which to store the first gadget
  280.   num     : pointer to WORD, in which to store the number of primary gadgets
  281.  
  282. RETURNS
  283.  
  284.  
  285.  
  286. egsgadbox.library/EB_CreateActionGadget
  287. NAME
  288.   EB_CreateActionGadget   create an action gadget
  289.  
  290. SYNOPSIS
  291.   box = EB_CreateActionGadget(con, with, id)
  292.   D0                          A0   A1     D0
  293.  
  294.   EB_GadContext  con;
  295.   EB_GadBoxPtr   box, with;
  296.   LONG           id;
  297.  
  298. FUNCTION
  299.   Creates an action gadget around a gadbox subtree using the id. The subtree
  300.   may only contain rendering information, which is used for the gadgets
  301.   active field. The gadget has flag EI_stdHighlight set, so you need no
  302.   extra border around the gadget.
  303.  
  304. INPUTS
  305.   con   : pointer to gadcontext
  306.   with  : subtree, describing the gadgets graphic
  307.   id    : gadgets id
  308.  
  309. RETURNS
  310.   NULL if fails, else pointer to new subtree
  311.  
  312.  
  313. egsgadbox.library/EB_CreateArrow
  314. NAME
  315.   EB_CreateArrow   create an arrow gadget
  316.  
  317. SYNOPSIS
  318.   box = EB_CreateArrow(con, dest, id)
  319.   D0                   A0   D0    D1
  320.  
  321.   EB_GadBoxPtr   box;
  322.   EB_GadContext  con;
  323.   WORD           dest;
  324.   LONG           id;
  325.  
  326. FUNCTION
  327.   Creates an arrow gadget, pointing in direction dest (see EI_arrow..).
  328.  
  329. INPUTS
  330.   con   : pointer to gadcontext
  331.   dest  : pointers destination
  332.   id    : gadgets id
  333.  
  334. RETURNS
  335.   NULL if fails, else pointer to new subtree
  336.  
  337.  
  338.  
  339. egsgadbox.library/EB_CreateArrowGfx
  340. NAME
  341.   EB_CreateArrowGfx   creates an arrow
  342.  
  343. SYNOPSIS
  344.   box = EB_CreateArrowGfx(con, dest)
  345.   D0                      A0   D0
  346.  
  347.   EB_GadBoxPtr   box;
  348.   EB_GadContext  con;
  349.   WORD           dest;
  350.  
  351. FUNCTION
  352.   Creates the graphics for an arrow, pointing in direction dest
  353.   (see EI_arrow..).
  354.  
  355. INPUTS
  356.   con   : pointer to gadcontext
  357.   dest  : pointers destination
  358.  
  359. RETURNS
  360.   NULL if fails, else pointer to new subtree
  361.  
  362.  
  363.  
  364. egsgadbox.library/EB_CreateBackBorder
  365. NAME
  366.   EB_CreateBackBorder   creates a back border
  367.  
  368. SYNOPSIS
  369.   box = EB_CreateBackBorder(con, around, fill)
  370.   D0                        A0   A1      D0
  371.  
  372.   EB_GadBoxPtr   box;
  373.   EB_GadContext  con;
  374.   UBYTE          fill;
  375.  
  376. FUNCTION
  377.   Creates a border which seems to go into the screen around an existing
  378.   gadbox subtree. This function also creates a little space between the
  379.   inner graphics and the border.
  380.  
  381. INPUTS
  382.   con    : pointer to gadcontext
  383.   around : subtree, around which to build the border
  384.   fill   : flags, which determine, if the borderspace is allowed to expand
  385.        if needed
  386.  
  387. RETURNS
  388.   NULL if fails, else pointer to new subtree
  389.  
  390.  
  391.  
  392. egsgadbox.library/EB_CreateBoolGadget
  393. NAME
  394.   EB_CreateBoolGadget  create boolean gadget
  395.  
  396. SYNOPSIS
  397.   box = EB_CreateBoolGadget(con, with, id)
  398.   D0                        A0   A1    D0
  399.  
  400.   EB_GadBoxPtr   box;
  401.   EB_GadContext  con;
  402.   EB_GadBoxPtr   with;
  403.   LONG           id;
  404.  
  405. FUNCTION
  406.   Creates an boolean gadget around a gadbox subtree using the id. The subtree
  407.   may only contain rendering information, which is used for the gadgets
  408.   active field. The gadget has flag EI_stdHighlight set, so you need no
  409.   extra border around the gadget.
  410.  
  411. INPUTS
  412.   con   : pointer to gadcontext
  413.   with  : subtree, describing the gadgets graphic
  414.   id    : gadgets id
  415.  
  416. RETURNS
  417.   NULL if fails, else pointer to new subtree
  418.  
  419.  
  420.  
  421. egsgadbox.library/EB_CreateBorder
  422. NAME
  423.   EB_CreateBorder  create space around graphics
  424.  
  425. SYNOPSIS
  426.   box = EB_CreateBorder(con, around, fill)
  427.   D0                    A0   A1      D0
  428.  
  429.   EB_GadBoxPtr   box;
  430.   EB_GadContext  con;
  431.   EB_GadBoxPtr   around;
  432.   UBYTE          fill;
  433.  
  434. FUNCTION
  435.   Creates a little space around a subtree on each side.
  436.  
  437. INPUTS
  438.   con    : pointer to gadcontext
  439.   around : subtree, around which to build the border
  440.   fill   : flags, which determine, if the borderspace is allowed to expand
  441.        if needed
  442.  
  443. RETURNS
  444.   NULL if fails, else pointer to new subtree
  445.  
  446.  
  447.  
  448. egsgadbox.library/EB_CreateBox
  449. NAME
  450.   EB_CreateBox   create gadbox
  451.  
  452. SYNOPSIS
  453.   box = EB_CreateBox(con, orient, minWidth, maxWidth, minHeight, maxHeight)
  454.   D0                 A0   D0      D1        D2        D3         D4
  455.  
  456.   EB_GadBoxPtr   box;
  457.   EB_GadContext  con;
  458.   UBYTE          orient;
  459.   WORD           minWidth, maxWidth, minHeight, maxHeight;
  460.  
  461. FUNCTION
  462.   Creates a simple gadbox.
  463.  
  464. INPUTS
  465.    con      : pointer to gadcontext
  466.    orient   : orientation of the gadbox:
  467.         EB_horizontal  : the box may have several sons, which are
  468.                  ordered horizontal
  469.         EB_vertical    : the box may have several sons, which are
  470.                  ordered vertical
  471.         EB_unknown     : the box may have only one son
  472.         EB_horizTable  : the box may have several sons, whih may
  473.                  either be unknown, or vertical. All vertical
  474.                  sons must have the same number of sons,
  475.                  because the grandsons are ordered in a table.
  476.         EB_vertiTable  : the box may have several sons, whih may
  477.                  either be unknown, or horizontal. All
  478.                  horizontal sons must have the same number of
  479.                  sons, because the grandsons are ordered in a
  480.                  table.
  481.         EB_select      : the box may have several sons, which all lay
  482.                  at the same location.
  483.  
  484.   minWidth,
  485.   minHeight : minimal size of the box, EB_min for any
  486.   maxWidth,
  487.   maxHeight : maximal size of the box, EB_max for any
  488.  
  489. RETURNS
  490.   NULL if fails, else pointer to new gadbox
  491.  
  492.  
  493.  
  494. egsgadbox.library/EB_CreateBoxedMultiText
  495. NAME
  496.   EB_CreateBoxedMultiText   create text in box
  497.  
  498. SYNOPSIS
  499.   box = EB_CreateBoxedMultiText(con, text)
  500.   D0                            A0   A1
  501.  
  502.   EB_GadBoxPtr   box;
  503.   EB_GadContext  con;
  504.   EB_StrArrayPtr text;
  505.  
  506. FUNCTION
  507.   Creates several lines of text in a back bordered box.
  508.  
  509. INPUTS
  510.   con    : pointer to gadcontext
  511.   text   : Array of pointers to strings, which build the lines. The last entry
  512.        must contain NULL, for termination.
  513.  
  514. RETURNS
  515.   NULL if fails, else pointer to new subtree
  516.  
  517.  
  518.  
  519. egsgadbox.library/EB_CreateButton24
  520. NAME
  521.   EB_CreateButton24   creates 24 bit button
  522.  
  523. SYNOPSIS
  524.   box = EB_CreateButton24(con, around, color, back, fill)
  525.   D0                      A0   A1      D0     D1    D2
  526.  
  527.   EB_GadBoxPtr   box;
  528.   EB_GadContext  con;
  529.   EB_GadBoxPtr   around;
  530.   ULONG          color, back;
  531.   UBYTE          fill;
  532.  
  533. FUNCTION
  534.   Creates the graphics for a special three dimensional button, which may be
  535.   used for bool or action gadgets.
  536.  
  537. INPUTS
  538.   con     : pointer to gad context
  539.   around  : the buttons text or image
  540.   color   : the buttons color
  541.   back    : the color of the background, surrounding the button
  542.   fill    : flags, defining where to fill around the image
  543.  
  544. RETURNS
  545.   NULL if fails, else pointer to new subtree
  546.  
  547.  
  548.  
  549.  
  550. egsgadbox.library/EB_CreateButtonGadget
  551. NAME
  552.   EB_CreateButtonGadget   creates a round radio button
  553.  
  554. SYNOPSIS
  555.   box = EB_CreateButtonGadget(con, id)
  556.   D0                          A0   D0
  557.  
  558.   EB_GadBoxPtr   box;
  559.   EB_GadContext  con;
  560.   LONG           id;
  561.  
  562. FUNCTION
  563.   Creates the gadget and graphics for a radio gadget, that is a round
  564.   3d style gadget with a center that is filled on activation.
  565.   Normally these are used in the radio buttons (gbradio.library).
  566.  
  567. INPUTS
  568.   con     : pointer to gad context
  569.   id      : id of the gadget
  570.  
  571. RETURNS
  572.   box     : the resulting box or NULL if fails
  573.  
  574.  
  575.  
  576.  
  577. egsgadbox.library/EB_CreateCenterText
  578. NAME
  579.   EB_CreateCenterText   create centered text
  580.  
  581. SYNOPSIS
  582.   box = EB_CreateCenterText(con, str)
  583.   D0                        A0   A1
  584.  
  585.   EB_GadBoxPtr   box;
  586.   EB_GadContext  con;
  587.   char           *str;
  588.  
  589. FUNCTION
  590.   Creates a text that is centered using surrounding boxes.
  591.  
  592. INPUTS
  593.  
  594. RETURNS
  595.   NULL if fails, else pointer to new subtree
  596.  
  597.  
  598.  
  599.  
  600.  
  601. egsgadbox.library/EB_CreateCheckMarkGadget
  602. NAME
  603.   EB_CreateCheckMarkGadget   make a checkmark gadget
  604.  
  605.  
  606. SYNOPSIS
  607.   box = EB_CreateCheckMarkGadget(con, id)
  608.   D0                             A0   D0
  609.  
  610.   EB_GadBoxPtr   box;
  611.   EB_GadContext  con;
  612.   LONG           id;
  613.  
  614. FUNCTION
  615.   Creates an boolean gadget with a graphic that looks like a check-mark.
  616.   This gadget starts in the off state and comes complete with border
  617.   and everything.
  618.  
  619. INPUTS
  620.   con   : pointer to gadcontext
  621.   with  : subtree, describing the gadgets graphic
  622.   id    : gadgets id
  623.  
  624. RETURNS
  625.   NULL if fails, else pointer to new subtree
  626.  
  627.  
  628.  
  629.  
  630.  
  631. egsgadbox.library/EB_CreateDoubleBorder
  632. NAME
  633.   EB_CreateDoubleBorder   create double border
  634.  
  635. SYNOPSIS
  636.   box = EB_CreateDoubleBorder(con, around, fill)
  637.   D0                          A0   A1      D0
  638.  
  639.   EB_GadBoxPtr   box;
  640.   EB_GadContext  con;
  641.   EB_GadBoxPtr   around;
  642.   UBYTE          fill;
  643.  
  644. FUNCTION
  645.   Creates a double border, normaly used for string/integer gadgets.
  646.  
  647. INPUTS
  648.  
  649. RETURNS
  650.   NULL if fails, else pointer to new subtree
  651.  
  652.  
  653.  
  654. egsgadbox.library/EB_CreateFillBox
  655. NAME
  656.   EB_CreateFillBox   create fill box
  657.  
  658. SYNOPSIS
  659.   box = EB_CreateFillBox(con)
  660.   D0                     A0
  661.  
  662.   EB_GadBoxPtr   box;
  663.   EB_GadContext  con;
  664.  
  665. FUNCTION
  666.   Creates a box, that can fill unused areas. It can be used for spacing around
  667.   fixed sized images when changing font size.
  668.  
  669. INPUTS
  670.  
  671. RETURNS
  672.   NULL if fails, else pointer to new subtree
  673.  
  674.  
  675.  
  676. egsgadbox.library/EB_CreateFrontBorder
  677. NAME
  678.   EB_CreateFrontBorder  creates a front border
  679.  
  680. SYNOPSIS
  681.   box = EB_CreateFrontBorder(con, around, fill)
  682.   D0                         A0   A1      D0
  683.  
  684.   EB_GadBoxPtr   box;
  685.   EB_GadContext  con;
  686.   EB_GadBoxPtr   around;
  687.   UBYTE          fill;
  688.  
  689. FUNCTION
  690.   Creates a border which seems to come out of the screen around an existing
  691.   gadbox subtree. This function also creates a little space between the
  692.   inner graphics and the border.
  693.  
  694. INPUTS
  695.   con    : pointer to gadcontext
  696.   around : subtree, around which to build the border
  697.   fill   : flags, that determine, if the borderspace is allowed to expand
  698.        if needed
  699.  
  700. RETURNS
  701.   NULL if fails, else pointer to new subtree
  702.  
  703.  
  704.  
  705. egsgadbox.library/EB_CreateGadContext
  706. NAME
  707.   EB_CreateGadContext   create gadget context
  708.  
  709. SYNOPSIS
  710.   con = EB_CreateGadContext(font, tfont, color, back)
  711.   D0                        A0    A1     D0     D1
  712.  
  713.   EB_GadContext  con;
  714.   EG_EFontPtr    font, tfont;
  715.   ULONG          color, back;
  716.  
  717. FUNCTION
  718.   Creates a gadget context. This structure keeps track of all structures that
  719.   are allocated to create a gadbox tree, and all gadgets and substructures.
  720.   This structure also contains information obout the fonts and colors of
  721.   the gadgets. The structure has to be deleted using EB_DeleteGadContext, after
  722.   the requester/window has been closed. This will also delete all associated
  723.   structures and gadgets.
  724.  
  725. INPUTS
  726.   font     : normal font, if NULL the system window font is used
  727.   tfont    : text gadget font, if NULL the system default font is used
  728.   color,
  729.   back     : colors for 24 bit gadgets, -1 if normal gadgets are to be used
  730.  
  731. RETURNS
  732.   NULL if fails, else pointer to new gadget context
  733.  
  734.  
  735.  
  736.  
  737. egsgadbox.library/EB_CreateGroupBorder
  738. NAME
  739.   EB_CreateGroupBorder     creates a nice looking border with text around a box
  740.  
  741. SYNOPSIS
  742.   box = EB_CreateGroupBorder(con,around,fill,name);
  743.   D0                         A0  A1     D0   A2
  744.  
  745.   EB_GadBoxPtr  box;
  746.   EB_GadContext con;
  747.   EB_GadBoxPtr  around;
  748.   LONG          fill;
  749.   char          *name;
  750.  
  751. FUNCTION
  752.   This function will create a 3D border around a box. The top line
  753.   will be broken in the middle and in that break, the name is
  754.   displayed, like this:        +---- Name ----+
  755.                    |              |
  756.                    | Box Contents |
  757.                    |              |
  758.                    +--------------+
  759. INPUTS
  760.   con    : pointer to gadcontext
  761.   around : pointer to the interior
  762.   fill   : where you want fill space
  763.   name   : null-terminated string
  764.  
  765. RETURNS
  766.   NULL if fails, else pointer to new subtree
  767.  
  768.  
  769.  
  770.  
  771. egsgadbox.library/EB_CreateHorizBox
  772. NAME
  773.   EB_CreateHorizBox   creates horizontal box
  774.  
  775. SYNOPSIS
  776.   box = EB_CreateHorizBox(con)
  777.   D0                      A0
  778.  
  779.   EB_GadBoxPtr   box;
  780.   EB_GadContext  con;
  781.  
  782. FUNCTION
  783.   Creates a box that combines several other boxes horizontal. All son boxes
  784.   of a horizontal box are places one besides the other, and build a row.
  785.  
  786. INPUTS
  787.   con    : pointer to gadcontext
  788.  
  789. RETURNS
  790.   NULL if fails, else pointer to new subtree
  791.  
  792.  
  793.  
  794. egsgadbox.library/EB_CreateHorizFill
  795. NAME
  796.   EB_CreateHorizFill   create horizontal pad
  797.  
  798. SYNOPSIS
  799.   box = EB_CreateHorizFill(con, fill, pri)
  800.   D0                       A0   D0    D1
  801.  
  802.   EB_GadBoxPtr   box;
  803.   EB_GadContext  con;
  804.   BOOL           fill;
  805.   BYTE           pri;
  806.  
  807. FUNCTION
  808.   Creates a fill element for horizontal boxes. This should be used, to separate
  809.   gadgets or gadget groups, or to create paddings betweeen borders.
  810.  
  811. INPUTS
  812.   con    : pointer to gadcontext
  813.   fill   : flag, that determines, if the fill box is allowed to expand if needed
  814.   pri    : the boxes priority
  815.  
  816. RETURNS
  817.   NULL if fails, else pointer to new subtree
  818.  
  819.  
  820.  
  821. egsgadbox.library/EB_CreateHorizProp
  822. NAME
  823.   EB_CreateHorizProp   create horizontal propgadget
  824.  
  825. SYNOPSIS
  826.   box = EB_CreateHorizProp(con, maximum, size, val, id)
  827.   D0                       A0   D0       D1    D2   D3
  828.  
  829.   EB_GadBoxPtr   box;
  830.   EB_GadContext  con;
  831.   WORD           maximum, size, val;
  832.   LONG           id;
  833.  
  834. FUNCTION
  835.   Creates a horizontal proportional gadget, and all needed graphics.
  836.  
  837. INPUTS
  838.   con      : pointer to gadcontext
  839.   maximum  : maximum value of slider
  840.   size     : size of slider
  841.   val      : value of slider
  842.   id       : the gadgets id
  843.  
  844. RETURNS
  845.   NULL if fails, else pointer to new subtree
  846.  
  847.  
  848.  
  849. egsgadbox.library/EB_CreateHorizTable
  850. NAME
  851.   EB_CreateHorizTable   create horizontal table
  852.  
  853. SYNOPSIS
  854.   box = EB_CreateHorizTable(con)
  855.   D0                        A0
  856.  
  857.   EB_GadBoxPtr   box;
  858.   EB_GadContext  con;
  859.  
  860. FUNCTION
  861.   Creates a horizontal table, that may contain several vertical boxes, and
  862.   arranges their elements in a table.
  863.  
  864. INPUTS
  865.  
  866. RETURNS
  867.   NULL if fails, else pointer to new subtree
  868.  
  869.  
  870.  
  871. egsgadbox.library/EB_CreateInfoBox
  872. NAME
  873.   EB_CreateInfoBox   creates information box
  874.  
  875. SYNOPSIS
  876.   box = EB_CreateInfoBox(con, info, font, minWidth, maxWidth, justify)
  877.   D0                     A0   A1    A2    D0        D1        D2
  878.  
  879.   EB_GadBoxPtr   box;
  880.   EB_GadContext  con;
  881.   EB_InfoBoxPtr  info;
  882.   EG_EFontPtr    font;
  883.   WORD           minWidth, maxWidth;
  884.   UBYTE          justify;
  885.  
  886. FUNCTION
  887.    Creates an information box. This type of box is used, to display text in
  888.    an allready rendered window/gadget. The function modifies a given structure
  889.    by setting real coordinates and real dimensions after calculating.
  890.  
  891. INPUTS
  892.   con       : pointer to gadcontext
  893.   info      : pointer to info box, that is modified
  894.   font      : font, in which to display the text
  895.   minWidth,
  896.   maxWidth  : minimum and maximum dimensions in characters
  897.   justify   : justification of displayed text
  898.  
  899. RETURNS
  900.   NULL if fails, else pointer to new gadbox
  901.  
  902.  
  903.  
  904. egsgadbox.library/EB_CreateIntegerGadget
  905. NAME
  906.   EB_CreateIntegerGadget    creates an integer gadget
  907.  
  908. SYNOPSIS
  909.   box = EB_CreateIntegerGadget(con, minChar, digits, id)
  910.   D0                           A0   D0       D1      D2
  911.  
  912.   EB_GadBoxPtr   box;
  913.   EB_GadContext  con;
  914.   WORD           minChar, digits;
  915.   LONG           id;
  916.  
  917. FUNCTION
  918.   Creates an integer gadget and associated graphics.
  919.  
  920. INPUTS
  921.   con     : pointer to gad context
  922.   minChar : minimum number of chars to display
  923.   digits  : number of digits in integer number
  924.   id      : the gadgets id
  925.  
  926. RETURNS
  927.   NULL if fails, else pointer to new subtree
  928.  
  929.  
  930.  
  931. egsgadbox.library/EB_CreateLateBox
  932. NAME
  933.   EB_CreateLateBox   create late calculation box
  934.  
  935. SYNOPSIS
  936.   box = EB_CreateLateBox(con, create, minWidth, maxWidth, minHeight, maxHeight)
  937.   D0                     A0   A1      D0        D1        D2         D3
  938.  
  939.   EB_GadBoxPtr   box;
  940.   EB_GadContext  con;
  941.   EB_GBCreate    create;
  942.   WORD           minWidth, maxWidth, minHeight, maxHeight;
  943.  
  944. FUNCTION
  945.   Creates a late construction box. The interiour of this type of box is
  946.   created during calculation, by a call to EB_GBCreate. This function is called
  947.   with a pointer to the box in A0. At this time the real size of the box is
  948.   allready calculated and resides in box->minWidth and box->maxWidth.
  949.  
  950. INPUTS
  951.   con        : pointer to gad context
  952.   create     : constructor procedure.
  953.   minWidth,
  954.   minHeight  : minimal dimensions
  955.   maxWidth,
  956.   maxHeight  : maximum dimensions
  957.  
  958. RETURNS
  959.   NULL if fails, else pointer to new subtree
  960.  
  961.  
  962.  
  963. egsgadbox.library/EB_CreateMaster
  964. NAME
  965.   EB_CreateMaster   create a master gadget
  966.  
  967. SYNOPSIS
  968.   box = EB_CreateMaster(con, type, id)
  969.   D0                    A0   D0    D1
  970.  
  971.   EB_GadBoxPtr   box;
  972.   EB_GadContext  con;
  973.   LONG           type;
  974.   LONG           id;
  975.  
  976. FUNCTION
  977.   Creates a master gadget. A master gadget is a gadget, that contains several
  978.   other gadgets. E.g. a prop gadget with arrows is a master gadget, containing
  979.   to action gadgets an a normal prop gadget.
  980.  
  981. INPUTS
  982.   con     : pointer to gadget context
  983.   type    : custom type id
  984.   id      : gadget id
  985.  
  986. RETURNS
  987.   NULL if fails, else pointer to new subtree
  988.  
  989.  
  990.  
  991. egsgadbox.library/EB_CreateMasterWindow
  992. NAME
  993.   EB_CreateMasterWindow   creates a master window
  994.  
  995. SYNOPSIS
  996.   box = EB_CreateMasterWindow(con, win, with)
  997.   D0                          A0   A1   A2
  998.  
  999.   EB_GadBoxPtr   box;
  1000.   EB_GadContext  con;
  1001.   EI_WindowPtr   win;
  1002.   EB_GadBoxPtr   with;
  1003.  
  1004. FUNCTION
  1005.   Creates a window (or uses an exisiting one) that contains only one gadget,
  1006.   a master gadget, that includes all rendering and subgadgets, so it can
  1007.   easily be removed, resized, and added again.
  1008.  
  1009. INPUTS
  1010.  
  1011. RETURNS
  1012.   NULL if fails, else pointer to new tree
  1013.  
  1014.  
  1015.  
  1016. egsgadbox.library/EB_CreateMultiAction
  1017. NAME
  1018.   EB_CreateMultiAction   creates several action gadgets
  1019.  
  1020. SYNOPSIS
  1021.   box = EB_CreateMultiAction(con, names, ids, fill)
  1022.   D0                         A0   A1     D0   D1
  1023.  
  1024.   EB_GadBoxPtr   box;
  1025.   EB_GadContext  con;
  1026.   EB_StrArrayPtr names;
  1027.   LONG           ids;
  1028.   UBYTE          fill;
  1029.  
  1030. FUNCTION
  1031.   Creates several action gadgets in a row. The names of the gadgets must be
  1032.   supplied in an array of pointers to string. The last element in the array
  1033.   must be a NULL for termination.
  1034.  
  1035. INPUTS
  1036.   con    : pointer to gadget context
  1037.   names  : pointer to array of pointers to string.
  1038.   ids    : first gadgets id, following gadgets have successing numbers
  1039.   fill   : flags, if filling is allowed
  1040.  
  1041. RETURNS
  1042.   NULL if fails, else pointer to new subtree
  1043.  
  1044.  
  1045.  
  1046. egsgadbox.library/EB_CreateMultiAction2
  1047. NAME
  1048.   EB_CreateMultiAction2   creates a table of action gadgets
  1049.  
  1050. SYNOPSIS
  1051.   box = EB_CreateMultiAction2(con, names, ids)
  1052.   D0                          A0   A1     D0
  1053.  
  1054.   EB_GadBoxPtr    box;
  1055.   EB_GadContext   con;
  1056.   EB_StrArrayPtr2 names;
  1057.   LONG            id;
  1058.  
  1059. FUNCTION
  1060.   Creates a table of action gadgets. The names of the gadgets must be
  1061.   provided in an array of pointers to arrays of pointers to strings.
  1062.   The last elements in the arrays must be NULL for termination.
  1063.  
  1064. INPUTS
  1065.   con     : pointer to gadget context
  1066.   names   : pointer to array of pointers to arrays of pointers to strings
  1067.   ids     : The number of the top left gadgets. Gadget ids from left to
  1068.         right increase by one, from top to bottom by 0x100.
  1069.  
  1070. RETURNS
  1071.   NULL if fails, else pointer to new subtree
  1072.  
  1073.  
  1074.  
  1075. egsgadbox.library/EB_CreateMultiActionV
  1076. NAME
  1077.   EB_CreateMultiActionV   creates several action gadgets
  1078.  
  1079. SYNOPSIS
  1080.   box = EB_CreateMultiActionV(con, names, ids, fill)
  1081.   D0                          A0   A1     D0   D1
  1082.  
  1083.   EB_GadBoxPtr   box;
  1084.   EB_GadContext  con;
  1085.   char           *names;
  1086.   LONG           ids;
  1087.   UBYTE          fill;
  1088.  
  1089. FUNCTION
  1090.   Creates several action gadgets in a collumn. The names of the gadgets must be
  1091.   provided in an array of pointers to string. The last element in the array
  1092.   must be a NULL for termination.
  1093.  
  1094. INPUTS
  1095.   con    : pointer to gadget context
  1096.   names  : pointer to array of pointers to string.
  1097.   ids    : first gadgets id, following gadgets have successing numbers
  1098.   fill   : flags, if filling is allowed
  1099.  
  1100.  
  1101. RETURNS
  1102.   NULL if fails, else pointer to new subtree
  1103.  
  1104.  
  1105.  
  1106. egsgadbox.library/EB_CreateMultiText
  1107. NAME
  1108.   EB_CreateMultiText
  1109.  
  1110. SYNOPSIS
  1111.   box = EB_CreateMultiText(con, text)
  1112.   D0                       A0   A1
  1113.  
  1114.   EB_GadBoxPtr   box;
  1115.   EB_GadContext  con;
  1116.   EB_StrArrayPtr text;
  1117.  
  1118. FUNCTION
  1119.   Creates several lines of text;
  1120.  
  1121. INPUTS
  1122.   con    : pointer to gadcontext
  1123.   text   : Array of pointers to strings, which build the lines. The last entry
  1124.        must contain NULL, for termination.
  1125.  
  1126. RETURNS
  1127.   NULL if fails, else pointer to new subtree
  1128.  
  1129.  
  1130.  
  1131. egsgadbox.library/EB_CreateNameIntegerGadget
  1132. NAME
  1133.   EB_CreateNameIntegerGadget   create integer gadget with name
  1134.  
  1135. SYNOPSIS
  1136.   box = EB_CreateNameIntegerGadget(con, name, minChar, digits, id)
  1137.   D0                               A0   A1    D0       D1      D2
  1138.  
  1139.   EB_GadBoxPtr   box;
  1140.   EB_GadContext  con;
  1141.   char           *name;
  1142.   WORD           minChar, digits;
  1143.   LONG           id;
  1144.  
  1145. FUNCTION
  1146.   Creates an integer gadget with a name on its left side (see
  1147.   EB_CreateIntegerGadget for more information)
  1148.  
  1149. INPUTS
  1150.  
  1151. RETURNS
  1152.   NULL if fails, else pointer to new subtree
  1153.  
  1154.  
  1155.  
  1156. egsgadbox.library/EB_CreateNameRealGadget
  1157. NAME
  1158.   EB_CreateNameRealGadget   create a real gadget with a name
  1159.  
  1160. SYNOPSIS
  1161.   box = EB_CreateNameRealGadget(con, name, minChar, digits, id)
  1162.   D0                            A0   A1    D0       D1      D2
  1163.  
  1164.   EB_GadBoxPtr   box;
  1165.   EB_GadContext  con;
  1166.   char           *name;
  1167.   WORD           minChar, digits;
  1168.   LONG           id;
  1169.  
  1170. FUNCTION
  1171.   Creates an longreal gadget with a name on its left side (see
  1172.   EB_CreateRealGadget for more information)
  1173.  
  1174. INPUTS
  1175.  
  1176. RETURNS
  1177.   NULL if fails, else pointer to new subtree
  1178.  
  1179.  
  1180.  
  1181. egsgadbox.library/EB_CreateNameStringGadget
  1182. NAME
  1183.   EB_CreateNameStringGadget   creates a string gadget with name
  1184.  
  1185. SYNOPSIS
  1186.   box = EB_CreateNameStringGadget(con, name, minChar, buffLen, justify, id)
  1187.   D0                              A0   A1    D0       D1       D2       D3
  1188.  
  1189.   EB_GadBoxPtr   box;
  1190.   EB_GadContext  con;
  1191.   char           *name;
  1192.   WORD           minChar, buffLen;
  1193.   UBYTE          justify;
  1194.   LONG           id;
  1195.  
  1196. FUNCTION
  1197.   Creates an string gadget with a name on its left side (see
  1198.   EB_CreateStringGadget for more information)
  1199.  
  1200. INPUTS
  1201.  
  1202. RETURNS
  1203.   NULL if fails, else pointer to new subtree
  1204.  
  1205.  
  1206.  
  1207. egsgadbox.library/EB_CreateRealGadget
  1208. NAME
  1209.   EB_CreateRealGadget    creates a longreal gadget
  1210.  
  1211. SYNOPSIS
  1212.   box = EB_CreateRealGadget(con, minChar, digits, id)
  1213.   D0                        A0   D0       D1      D2
  1214.  
  1215.   EB_GadBoxPtr   box;
  1216.   EB_GadContext  con;
  1217.   WORD           minChar, digits;
  1218.   LONG           id;
  1219.  
  1220. FUNCTION
  1221.   Creates an longreal gadget and associated graphics.
  1222.  
  1223. INPUTS
  1224.   con     : pointer to gad context
  1225.   minChar : minimum number of chars to display
  1226.   digits  : number of digits in real number
  1227.   id      : the gadgets id
  1228.  
  1229. RETURNS
  1230.   NULL if fails, else pointer to new subtree
  1231.  
  1232.  
  1233.  
  1234. egsgadbox.library/EB_CreateResponseBox
  1235. NAME
  1236.   EB_CreateResponseBox   creates a response box
  1237.  
  1238. SYNOPSIS
  1239.   box = EB_CreateResponseBox(con, response, minWidth, maxWidth,
  1240.   D0                         A0   A1        D0        D1
  1241.                  minHeight, maxHeight)
  1242.                  D2         D3
  1243.  
  1244.   EB_GadBoxPtr   box;
  1245.   EB_GadContext  con;
  1246.   EB_ResBoxPtr   response;
  1247.   WORD           minWidth, maxWidth, minHeight, maxHeight;
  1248.  
  1249. FUNCTION
  1250.   Creates a response box. This box contains a pointer to a structur, in which
  1251.   the resulting coordinates of this box are written. This type is usefull
  1252.   for input and output elements, which are not easy to fit in gadgets and
  1253.   or rendering.
  1254.  
  1255. INPUTS
  1256.   con       : pointer to gadcontext
  1257.   response  : pointer to response box. In this box the resulting coordinates are
  1258.           written.
  1259.   minWidth,
  1260.   minHeight : minimum dimensions
  1261.   maxWidth,
  1262.   maxHeight : maximum dimensions.
  1263.  
  1264. RETURNS
  1265.   NULL if fails, else pointer to new gadbox
  1266.  
  1267.  
  1268.  
  1269. egsgadbox.library/EB_CreateStringGadget
  1270. NAME
  1271.   EB_CreateStringGadget   create a string gadget
  1272.  
  1273. SYNOPSIS
  1274.   box = EB_CreateStringGadget(con, minChar, buffLen, justify, id)
  1275.   D0                          A0   D0       D1       D2       D3
  1276.  
  1277.   EB_GadBoxPtr   box;
  1278.   EB_GadContext  con;
  1279.   WORD           minChar, buffLen;
  1280.   UBYTE          justify;
  1281.   LONG           id;
  1282.  
  1283. FUNCTION
  1284.   Creates a string gadget, and associated graphics.
  1285.  
  1286. INPUTS
  1287.   con     : pointer to gadget context
  1288.   minChar : minimal number of characters to be displayed
  1289.   buffLen : size of buffer
  1290.   justify : jsutification of string
  1291.   id      : the gadgets id
  1292.  
  1293. RETURNS
  1294.   NULL if fails, else pointer to new subtree
  1295.  
  1296.  
  1297.  
  1298. egsgadbox.library/EB_CreateSuperHorizProp
  1299. NAME
  1300.   EB_CreateSuperHorizProp   create prop gadget with arrows
  1301.  
  1302. SYNOPSIS
  1303.   box = EB_CreateSuperHorizProp(con, maximum, size, value, id, flags)
  1304.   D0                            A0   D0       D1    D2     D3  D4
  1305.  
  1306.   EB_GadBoxPtr   box;
  1307.   EB_GadContext  con;
  1308.   WORD           maximum, size, value;
  1309.   LONG           id;
  1310.   UBYTE          flags;
  1311.  
  1312. FUNCTION
  1313.   Creates a proportional gadget with arrows for increasing and decreasing.
  1314.   The arrows work without additional programming. They may be located on any
  1315.   side of the gadgets, determined by the contents of flags. (See
  1316.   EB_CreateHorizProp for further information)
  1317.  
  1318. INPUTS
  1319.  
  1320. RETURNS
  1321.   NULL if fails, else pointer to new subtree
  1322.  
  1323.  
  1324.  
  1325. egsgadbox.library/EB_CreateSuperVertiProp
  1326. NAME
  1327.   EB_CreateSuperVertiProp   create prop gadget with arrows
  1328.  
  1329. SYNOPSIS
  1330.   box = EB_CreateSuperVertiProp(con, maximum, size, value, id, flags)
  1331.   D0                            A0   D0       D1    D2     D3  D4
  1332.  
  1333.   EB_GadBoxPtr   box;
  1334.   EB_GadContext  con;
  1335.   WORD           maximum, size, value;
  1336.   LONG           id;
  1337.   UBYTE          flags;
  1338.  
  1339. FUNCTION
  1340.   Creates a proportional gadget with arrows for increasing and decreasing.
  1341.   The arrows work without additional programming. They may be located on any
  1342.   side of the gadgets, determined by the contents of flags. (See
  1343.   EB_CreateVertiProp for further information)
  1344.  
  1345. INPUTS
  1346.  
  1347. RETURNS
  1348.   NULL if fails, else pointer to new subtree
  1349.  
  1350.  
  1351.  
  1352. egsgadbox.library/EB_CreateText
  1353. NAME
  1354.   EB_CreateText   creates a line of text
  1355.  
  1356. SYNOPSIS
  1357.   box = EB_CreateText(con, str)
  1358.   D0                  A0   A1
  1359.  
  1360.   EB_GadBoxPtr   box;
  1361.   EB_GadContext  con;
  1362.   char           *str;
  1363.  
  1364. FUNCTION
  1365.   Creates one line of text in the contexts font.
  1366.  
  1367. INPUTS
  1368.  
  1369. RETURNS
  1370.   NULL if fails, else pointer to new subtree
  1371.  
  1372.  
  1373.  
  1374. egsgadbox.library/EB_CreateTextAction
  1375. NAME
  1376.   EB_CreateTextAction   create action gadget
  1377.  
  1378. SYNOPSIS
  1379.   box = EB_CreateTextAction(con, name, id, fill)
  1380.   D0                        A0   A1    D0  D1
  1381.  
  1382.   EB_GadBoxPtr   box;
  1383.   EB_GadContext  con;
  1384.   char           *name;
  1385.   LONG           id;
  1386.   UBYTE          fill;
  1387.  
  1388. FUNCTION
  1389.   Creates an action gadget around a text.
  1390.  
  1391. INPUTS
  1392.  
  1393. RETURNS
  1394.   NULL if fails, else pointer to new subtree
  1395.  
  1396.  
  1397.  
  1398. egsgadbox.library/EB_CreateTextBoolean
  1399. NAME
  1400.   EB_CreateTextBoolean   creates boolean gadget
  1401.  
  1402. SYNOPSIS
  1403.   box = EB_CreateTextBoolean(con, name, id, fill)
  1404.   D0                         A0   A1    D0  D1
  1405.  
  1406.   EB_GadBoxPtr   box;
  1407.   EB_GadContext  con;
  1408.   char           *name;
  1409.   LONG           id;
  1410.   UBYTE          fill;
  1411.  
  1412. FUNCTION
  1413.   Creates an boolean gadget around a text.
  1414.  
  1415. INPUTS
  1416.  
  1417. RETURNS
  1418.   NULL if fails, else pointer to new subtree
  1419.  
  1420.  
  1421.  
  1422. egsgadbox.library/EB_CreateVertiBox
  1423. NAME
  1424.   EB_CreateVertiBox   create vertical box
  1425.  
  1426. SYNOPSIS
  1427.   box = EB_CreateVertiBox(con)
  1428.   D0                      A0
  1429.  
  1430.   EB_GadBoxPtr   box;
  1431.   EB_GadContext  con;
  1432.  
  1433. FUNCTION
  1434.   Creates a box that combines several other boxes vertical. All son boxes
  1435.   of a vertical box are placed one below the other, and build a column.
  1436.  
  1437. INPUTS
  1438.  
  1439. RETURNS
  1440.   NULL if fails, else pointer to new subtree
  1441.  
  1442.  
  1443.  
  1444. egsgadbox.library/EB_CreateVertiFill
  1445. NAME
  1446.   EB_CreateVertiFill   create vertical fill element
  1447.  
  1448. SYNOPSIS
  1449.   box = EB_CreateVertiFill(con, fill, pri)
  1450.   D0                       A0   D0    D1
  1451.  
  1452.   EB_GadBoxPtr   box;
  1453.   EB_GadContext  con;
  1454.   UBYTE          fill;
  1455.   BYTE           pri;
  1456.  
  1457. FUNCTION
  1458.   Creates a fill element for vertical boxes. This should be used, to separate
  1459.   gadgets or gadget groups, or to create paddings betweeen borders.
  1460.  
  1461. INPUTS
  1462.   con    : pointer to gadcontext
  1463.   fill   : flag, that determines, if the fill box is allowed to expand if needed
  1464.   pri    : the boxes priority
  1465.  
  1466.  
  1467. RETURNS
  1468.   NULL if fails, else pointer to new subtree
  1469.  
  1470.  
  1471.  
  1472. egsgadbox.library/EB_CreateVertiProp
  1473. NAME
  1474.   EB_CreateVertiProp   creates a vertical prop gadget
  1475.  
  1476. SYNOPSIS
  1477.   box = EB_CreateVertiProp(con, maximum, size, val, id)
  1478.   D0                       A0   D0       D1    D2   D3
  1479.  
  1480.   EB_GadBoxPtr   box;
  1481.   EB_GadContext  con;
  1482.   WORD           maximum, size, val;
  1483.   LONG           id;
  1484.  
  1485. FUNCTION
  1486.   Creates a vertical proportional gadget, and all needed graphics.
  1487.  
  1488. INPUTS
  1489.   con      : pointer to gadcontext
  1490.   maximum  : maximum value of slider
  1491.   size     : size of slider
  1492.   val      : value of slider
  1493.   id       : the gadgets id
  1494.  
  1495. RETURNS
  1496.   NULL if fails, else pointer to new subtree
  1497.  
  1498.  
  1499.  
  1500. egsgadbox.library/EB_CreateVertiTable
  1501. NAME
  1502.   EB_CreateVertiTable   creates a table
  1503.  
  1504. SYNOPSIS
  1505.   box = EB_CreateVertiTable(con)
  1506.   D0                        A0
  1507.  
  1508.   EB_GadBoxPtr   box;
  1509.   EB_GadContext  con;
  1510.  
  1511. FUNCTION
  1512.   Creates a vertical table, that may contain several horizontal boxes, and
  1513.   arranges their elements in a table.
  1514.  
  1515. INPUTS
  1516.  
  1517. RETURNS
  1518.   NULL if fails, else pointer to new subtree
  1519.  
  1520.  
  1521.  
  1522. egsgadbox.library/EB_CreateWindow
  1523. NAME
  1524.   EB_CreateWindow   creates a window
  1525.  
  1526. SYNOPSIS
  1527.   box = EB_CreateWindow(con, left, top)
  1528.   D0                    A0   D0    D1
  1529.  
  1530.   EB_GadBoxPtr   box;
  1531.   EB_GadContext  con;
  1532.   WORD           left, top;
  1533.  
  1534. FUNCTION
  1535.   Creates a EI_NewWindow structure, associoated to a gadget box. The window will
  1536.   open at left/top, and include all gadboxes, which are added to it. Normally
  1537.   this function is not needed, because it is included in EB_ProcessGadBoxes.
  1538.  
  1539. INPUTS
  1540.  
  1541. RETURNS
  1542.   NULL if fails, else pointer to new tree
  1543.  
  1544.  
  1545.  
  1546. egsgadbox.library/EB_CWidth
  1547. NAME
  1548.   EB_CWidth   evaluate width of character
  1549.  
  1550. SYNOPSIS
  1551.   width = EB_CWidth(char, font)
  1552.   D0                D2    A1
  1553.  
  1554.   WORD         width;
  1555.   char         char;
  1556.   EG_EFontPtr  font;
  1557.  
  1558. FUNCTION
  1559.   Evaluates the width of one character.
  1560.  
  1561. INPUTS
  1562.  
  1563. RETURNS
  1564.  
  1565.  
  1566.  
  1567. egsgadbox.library/EB_DeleteGadContext
  1568. NAME
  1569.   EB_DeleteGadContext   delete a gad context
  1570.  
  1571. SYNOPSIS
  1572.   EB_DeleteGadContext(con)
  1573.               A0
  1574.  
  1575.   EB_GadContext  con;
  1576.  
  1577. FUNCTION
  1578.   Deletes a gadget context and the two included contexts. All memory which has
  1579.   been allocated to create the gadgets, and the gadgets self are deallocated.
  1580.  
  1581. INPUTS
  1582.  
  1583. RETURNS
  1584.  
  1585.  
  1586.  
  1587. egsgadbox.library/EB_FindGadget
  1588. NAME
  1589.   EB_FindGadget   find a gadget
  1590.  
  1591. SYNOPSIS
  1592.   gad = EB_FindGadget(first, num, id)
  1593.   D0                  A0     D0   D1
  1594.  
  1595.   EI_GadgetPtr   gad;
  1596.   EI_GadgetPtr   first;
  1597.   WORD           num;
  1598.   LONG           id;
  1599.  
  1600. FUNCTION
  1601.   Finds a gadget in a gadgetlist by its id.
  1602.  
  1603. INPUTS
  1604.   first   : pointer to first gadget in the list
  1605.   num     : number of gadgets in the list
  1606.   id      : the gadgets id
  1607.  
  1608. RETURNS
  1609.   pointer to the gadget, or NULL if it was not found
  1610.  
  1611.  
  1612.  
  1613. egsgadbox.library/EB_FreeMemCon
  1614. NAME
  1615.   EB_FreeMemCon   deallocate memory
  1616.  
  1617. SYNOPSIS
  1618.   EB_FreeMemCon(mem)
  1619.         A0
  1620.  
  1621.   APTR   mem;
  1622.  
  1623. FUNCTION
  1624.   Deallocates memory that was allocated using EB_AllocMemCon.
  1625.  
  1626. INPUTS
  1627.  
  1628. RETURNS
  1629.  
  1630.  
  1631.  
  1632. egsgadbox.library/EB_GetStringData
  1633. NAME
  1634.   EB_GetStringData   extract string from gadget buffer
  1635.  
  1636. SYNOPSIS
  1637.   EB_GetStringData(gad, str)
  1638.            A0   A1
  1639.  
  1640.   EI_GadgetPtr  gad;
  1641.   char          *str;
  1642.  
  1643. FUNCTION
  1644.   Extracts a string from a gadgets string buffer.
  1645.  
  1646. INPUTS
  1647.  
  1648. RETURNS
  1649.  
  1650.  
  1651.  
  1652. egsgadbox.library/EB_LinkStringGadgets
  1653. NAME
  1654.   EB_LinkStringGadgets   links two string gadgets
  1655.  
  1656. SYNOPSIS
  1657.   done = EB_LinkStringGadgets(con, from, to)
  1658.   D0                          A0   A1    A2
  1659.  
  1660.   BOOL           done;
  1661.   EB_GadContext  con;
  1662.   EB_GadBoxPtr   from, to;
  1663.  
  1664. FUNCTION
  1665.   Links two string gadgets so that the user can move from one to the other
  1666.   using TAB and SHIFT+TAB. The routine searches for the next string gadget
  1667.   in the subtree.
  1668.  
  1669. INPUTS
  1670.   con    : pointer to gadget context
  1671.   from   : subtree that contains the first string gadget
  1672.   to     : subtree that contains the second string gadget
  1673.  
  1674. RETURNS
  1675.   FALSE if failed, see error field in context for more information
  1676.  
  1677.  
  1678.  
  1679. egsgadbox.library/EB_LinkStringGadgetsID
  1680. NAME
  1681.   EB_LinkStringGadgetsID   links two string gadgets
  1682.  
  1683. SYNOPSIS
  1684.   done = EB_LinkStringGadgetsID(con, from, to, first, num)
  1685.   D0                            A0   D0    D1  A1     D2
  1686.  
  1687.   BOOL           done;
  1688.   EB_GadContext  con;
  1689.   LONG           from, to;
  1690.   EI_GadgetPtr   firs;
  1691.   WORD           num;
  1692.  
  1693. FUNCTION
  1694.   Links two string gadgets so that the user can move from one to the other
  1695.   using TAB and SHIFT+TAB. The routine searches for the gadgets in a
  1696.   gadget list. If num is -1 the routine takes the list provided by the gadget
  1697.   context.
  1698.  
  1699. INPUTS
  1700.   con      : pointer to gadget context
  1701.   from, to : the gadgets ids
  1702.   first    : first gadget in the list
  1703.   num      : number of gadgets in the list, or -1
  1704.  
  1705. RETURNS
  1706.   FALSE if failed, see error field in context for more information
  1707.  
  1708.  
  1709.  
  1710. egsgadbox.library/EB_MAX
  1711. NAME
  1712.   EB_MAX
  1713.  
  1714. SYNOPSIS
  1715.   max = EB_MAX(a, b)
  1716.   D0           D0 D1
  1717.  
  1718.   WORD max, a, b;
  1719.  
  1720. FUNCTION
  1721.   Finds the largest value of a and b
  1722.  
  1723. INPUTS
  1724.   a, b: Numbers to compare
  1725.  
  1726. RETURNS
  1727.   max - the largest number of a and b.
  1728.  
  1729.  
  1730. egsgadbox.library/EB_MIN
  1731. NAME
  1732.   EB_MIN
  1733.  
  1734. SYNOPSIS
  1735.   min = EB_MIN(a, b)
  1736.   D0           D0 D1
  1737.  
  1738.   WORD min, a, b;
  1739.  
  1740. FUNCTION
  1741.   Finds the smaller of a and b
  1742.  
  1743. INPUTS
  1744.   a, b: numbers to compare
  1745.  
  1746. RETURNS
  1747.   min - the smaller of a and b.
  1748.  
  1749.  
  1750. egsgadbox.library/EB_NewFixHeight
  1751. NAME
  1752.   EB_NewFixHeight   modify a box to fixed height
  1753.  
  1754. SYNOPSIS
  1755.   new = EB_NewFixHeight(box)
  1756.   D0                    A0
  1757.  
  1758.   EB_GadBoxPtr   new, box;
  1759.  
  1760. FUNCTION
  1761.   Modifies a gadbox so that its maximum height equals its minimum height, which
  1762.   has the effect, that the gadbox size is locked to its minimum.
  1763.  
  1764. INPUTS
  1765.   box   : pointer to gadbox
  1766.  
  1767. RETURNS
  1768.   the same pointer as box
  1769.  
  1770.  
  1771. egsgadbox.library/EB_NewFixWidth
  1772. NAME
  1773.   EB_NewFixWidth   modify a box to fixed width
  1774.  
  1775. SYNOPSIS
  1776.   new = EB_NewFixWidth(box)
  1777.   D0                   A0
  1778.  
  1779.   EB_GadBoxPtr   new, box;
  1780.  
  1781. FUNCTION
  1782.   Modifies a gadbox so that its maximum width equals its minimum width, which
  1783.   has the effect, that the gadbox size is locked to its minimum.
  1784.  
  1785. INPUTS
  1786.   box   : pointer to gadbox
  1787.   width : the new height of the box
  1788.  
  1789. RETURNS
  1790.   the same pointer as box
  1791.  
  1792.  
  1793.  
  1794. egsgadbox.library/EB_NewMaxHeight
  1795. NAME
  1796.   EB_NewMaxHeight   modifies a box maximum height
  1797.  
  1798. SYNOPSIS
  1799.   new = EB_NewMaxHeight(box, height)
  1800.   D0                    A0   D0
  1801.  
  1802.   EB_GadBoxPtr   new, box;
  1803.   WORD           height;
  1804.  
  1805. FUNCTION
  1806.   Modifies the maximum height of a gadbox
  1807.  
  1808. INPUTS
  1809.   box    : pointer to gadbox
  1810.   height : the new height of the box
  1811.  
  1812. RETURNS
  1813.   the same pointer as box
  1814.  
  1815.  
  1816.  
  1817. egsgadbox.library/EB_NewMaxWidth
  1818. NAME
  1819.   EB_NewMaxWidth   modifies a box maximum width
  1820.  
  1821. SYNOPSIS
  1822.   new = EB_NewMaxWidth(box, width)
  1823.   D0                   A0   D0
  1824.  
  1825.   EB_GadBoxPtr   new, box;
  1826.   WORD           width;
  1827.  
  1828. FUNCTION
  1829.   Modifies the maximum width of a gadbox
  1830.  
  1831. INPUTS
  1832.   box   : pointer to gadbox
  1833.  
  1834. RETURNS
  1835.   the same pointer as box
  1836.  
  1837.  
  1838.  
  1839. egsgadbox.library/EB_NewMinHeight
  1840. NAME
  1841.   EB_NewMinHeight   modifies a box minimum height
  1842.  
  1843. SYNOPSIS
  1844.   new = EB_NewMinHeight(box, height)
  1845.   D0                    A0   D0
  1846.  
  1847.   EB_GadBoxPtr   new, box;
  1848.   WORD           height;
  1849.  
  1850. FUNCTION
  1851.   Modifies the minimum height of a gadbox
  1852.  
  1853. INPUTS
  1854.   box   : pointer to gadbox
  1855.  
  1856. RETURNS
  1857.   the same pointer as box
  1858.  
  1859.  
  1860.  
  1861. egsgadbox.library/EB_NewMinWidth
  1862. NAME
  1863.   EB_NewMinWidth   modifies a box minimum width
  1864.  
  1865. SYNOPSIS
  1866.   new = EB_NewMinWidth(box, width)
  1867.   D0                   A0   D0
  1868.  
  1869.   EB_GadBoxPtr   new, box;
  1870.   WORD           width;
  1871.  
  1872. FUNCTION
  1873.   Modifies the minimum width of a gadbox
  1874.  
  1875.  
  1876. INPUTS
  1877.   box   : pointer to gadbox
  1878.  
  1879. RETURNS
  1880.   the same pointer as box
  1881.  
  1882.  
  1883.  
  1884. egsgadbox.library/EB_NewPri
  1885. NAME
  1886.   EB_NewPri   modifies a boxes priority
  1887.  
  1888. SYNOPSIS
  1889.   new = EB_NewPri(box, pri)
  1890.   D0              A0   D0
  1891.  
  1892.   EB_GadBoxPtr   new, box;
  1893.   BYTE           pri;
  1894.  
  1895. FUNCTION
  1896.   Modifies the priority of a box.
  1897.  
  1898. INPUTS
  1899.   box   : pointer to gadbox
  1900.   pri   : new priority
  1901.  
  1902. RETURNS
  1903.   the same pointer as box
  1904.  
  1905.  
  1906.  
  1907. egsgadbox.library/EB_NewSameSize
  1908. NAME
  1909.   EB_NewSameSize   changes all boxes in list to be same size
  1910.  
  1911. SYNOPSIS
  1912.   new = EB_NewSameSize(box)
  1913.   D0                   A0
  1914.  
  1915.   EB_GadBoxPtr   new, box;
  1916.  
  1917. FUNCTION
  1918.   Distributes the running length (width for horizontal boxes,
  1919.   height for vertical boxes) evenly to the boxes in
  1920.  
  1921.  
  1922. INPUTS
  1923.   box   : pointer to gadbox
  1924.  
  1925. RETURNS
  1926.   the same pointer as box
  1927.  
  1928.  
  1929.  
  1930. egsgadbox.library/EB_ProcessGadBoxes
  1931. NAME
  1932.   EB_ProcessGadBoxes   make a window out of a gad box tree
  1933.  
  1934. SYNOPSIS
  1935.   done = EB_ProcessGadBoxes(con, root)
  1936.   D0                        A0   A1
  1937.  
  1938.   BOOL           done;
  1939.   EB_GadContext  con;
  1940.   EB_GadBoxPtr   root;
  1941.  
  1942. FUNCTION
  1943.   Builds up a new window structure and a list of gadgets out of a gad box tree.
  1944.   Calls EB_CreateWindow, CalcMinMax, CalcRealSize, CalcPositions,
  1945.   CalcGadgetGfx, ConnectGadgets and deletes the tempororay context. The tree
  1946.   is deleted by this operation. If it succeeds, you can open a window, using
  1947.   the EI_NewWindow pointer in the EB_GadContext, and get all rendering and
  1948.   gadgets displayed and ready to use. You may modify the windows flags, but
  1949.   you should not modify its size.
  1950.  
  1951. INPUTS
  1952.   con    : pointer to gadget context
  1953.   root   : pointer to root of gadbox tree (is disposed during operation)
  1954.  
  1955. RETURNS
  1956.   FALSE if fails, see error field in gadget context for more information
  1957.  
  1958.  
  1959.  
  1960.  
  1961. egsgadbox.library/EB_ProcessGadBoxesSize
  1962. NAME
  1963.   EB_ProcessGadBoxesSize    fits gadboxes into boxes
  1964.  
  1965. SYNOPSIS
  1966.   done = EB_ProcessGadBoxesSize(con, root, width, height)
  1967.   D0                            A0   A1    D0     D1
  1968.  
  1969.   BOOL           done;
  1970.   EB_GadContext  con;
  1971.   EB_GadBoxPtr   root;
  1972.   WORD           width, height;
  1973.  
  1974. FUNCTION
  1975.   Builds up a new window structure and a list of gadgets out of a gad box
  1976.   tree, very much like EB_ProcessGadBoxes with the difference that
  1977.   the tree is attempted to be fitted into an area of width,height.
  1978.  
  1979. INPUTS
  1980.   con    : pointer to gadget context
  1981.   root   : pointer to root of gadbox tree (is disposed during operation)
  1982.   width  : desired minimum width
  1983.   height : desired minimum height
  1984.  
  1985. RETURNS
  1986.   FALSE if fails, see error field in gadget context for more information
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993. egsgadbox.library/EB_PutIntData
  1994. NAME
  1995.   EB_PutIntData   put integer value into gadget
  1996.  
  1997. SYNOPSIS
  1998.   EB_PutIntData(win, gad, val)
  1999.         A0   A1   D0
  2000.  
  2001.   EI_WindowPtr  win;
  2002.   EI_GadgetPtr  gad;
  2003.   LONG          val;
  2004.  
  2005. FUNCTION
  2006.   Puts an integer value in an integer gadget, and refreshes it, if the window
  2007.   is allready open.
  2008.  
  2009. INPUTS
  2010.   win    : pointer to the gadgets window or NULL, for no refresh
  2011.   gad    : pointer to integer gadget
  2012.   val    : value for gadget
  2013.  
  2014. RETURNS
  2015.  
  2016.  
  2017.  
  2018. egsgadbox.library/EB_PutRealData
  2019. NAME
  2020.   EB_PutRealData
  2021.  
  2022. SYNOPSIS
  2023.   EB_PutRealData(win,gad,val,field,digits,exp)(A0/A1/D0/D2/D3/D4)
  2024.  
  2025. FUNCTION
  2026.  
  2027. INPUTS
  2028.  
  2029. RETURNS
  2030.  
  2031.  
  2032.  
  2033. egsgadbox.library/EB_PutStringData
  2034. NAME
  2035.   EB_PutStringData    puts string in gadget
  2036.  
  2037. SYNOPSIS
  2038.   EB_PutStringData(win, gad, str)
  2039.            A0   A1   A2
  2040.  
  2041.   EI_WindowPtr  win;
  2042.   EI_GadgetPtr  gad;
  2043.   char          *str;
  2044.  
  2045. FUNCTION
  2046.   Puts a string in a string gadget and refreshes it if the window is allready
  2047.   open.
  2048.  
  2049. INPUTS
  2050.   win    : pointer to the gadgets window or NULL, for no refresh
  2051.   gad    : pointer to integer gadget
  2052.   str    : string for gadget
  2053.  
  2054. RETURNS
  2055.  
  2056.  
  2057.  
  2058. egsgadbox.library/EB_SMatch
  2059. NAME
  2060.   EB_SMatch   number of chars that match in field
  2061.  
  2062. SYNOPSIS
  2063.   len = EB_SMatch(str, font, width)
  2064.   D0              A0   A1    D2
  2065.  
  2066.   WORD        len;
  2067.   char        *str;
  2068.   EG_EFontPtr font;
  2069.   WORD        width;
  2070.  
  2071. FUNCTION
  2072.   Evaluates how many characters of a given string match into a text field.
  2073.  
  2074. INPUTS
  2075.   str     : pointer to string
  2076.   font    : font for which to evaluate
  2077.   width   : width of the field
  2078.  
  2079. RETURNS
  2080.   number of chars that match into the field, if all characters match, returns
  2081.   the strings length.
  2082.  
  2083.  
  2084.  
  2085. egsgadbox.library/EB_SWidth
  2086. NAME
  2087.   EB_SWidth   evaluate width of string
  2088.  
  2089. SYNOPSIS
  2090.   width = EB_SWidth(str, font)
  2091.   D0                A0   A1
  2092.  
  2093.   WORD        width;
  2094.   char        *str;
  2095.   EG_EFontPtr font;
  2096.  
  2097. FUNCTION
  2098.   Evaluates how width a string would be in a given font.
  2099.  
  2100. INPUTS
  2101.   str    : pointer to string
  2102.   font   : pointer to font
  2103.  
  2104. RETURNS
  2105.   width in pixel
  2106.  
  2107.  
  2108. egsgadbox.library/EB_WriteInfoBox
  2109. NAME
  2110.   EB_WriteInfoBox   write text in info box
  2111.  
  2112. SYNOPSIS
  2113.   EB_WriteInfoBox(info, win, str)
  2114.           A0    A1   A2
  2115.  
  2116.   EB_InfoBoxPtr  info;
  2117.   EI_WindowPtr   win;
  2118.   char           *str;
  2119.  
  2120. FUNCTION
  2121.   Writes a text into an info box (see EB_CreateInfoBox), if the string does
  2122.   not fit into the box, it is truncated.
  2123.  
  2124. INPUTS
  2125.   info    : pointer to info box, initialized by EB_CreateInfoBox
  2126.   win     : pointer to window
  2127.   str     : pointer to string
  2128.  
  2129. RETURNS
  2130.  
  2131.  
  2132.  
  2133. egsgadbox.library/EB_WriteInfoBoxInt
  2134. NAME
  2135.   EB_WriteInfoBoxInt   write number into info box
  2136.  
  2137. SYNOPSIS
  2138.   EB_WriteInfoBoxInt(info, win, val)
  2139.              A0    A1   D0
  2140.  
  2141.   EB_InfoBoxPtr   info;
  2142.   EI_WindowPtr    win;
  2143.   LONG            val;
  2144.  
  2145. FUNCTION
  2146.   Writes a number into an info box (see EB_CreateInfoBox), if the number does
  2147.   not fit into the box, it is truncated.
  2148.  
  2149. INPUTS
  2150.   info    : pointer to info box, initialized by EB_CreateInfoBox
  2151.   win     : pointer to window
  2152.   val     : number
  2153.  
  2154. RETURNS
  2155.  
  2156.  
  2157.  
  2158.